package ru.ssau.customerManagement.model;

import javax.xml.bind.SchemaOutputResolver;
import javax.xml.transform.Result;
import javax.xml.transform.stream.StreamResult;
import java.io.File;
import java.io.IOException;

/**
 * Created by 1 on 07.12.2014.
 */
public class ModelSchemaOutputResolver extends SchemaOutputResolver {
    public Result createOutput( String namespaceUri, String suggestedFileName ) throws IOException {

            // create new file
            File file = new File("c://test.txt");

            // create stream result
            StreamResult result = new StreamResult(file);

            // set system id
            result.setSystemId(file.toURI().toURL().toString());

            // return result
            return result;
    }
}

